<!--
 * @Author: gyc
 * @Date: 2020-05-25 16:12:07
 * @LastEditTime: 2020-08-22 13:29:02
 * @Description: Nuxt测试版
--> 
<template>
  <div class="movie-box-row">
    <nuxt-link to="movieInfo">
      <div
        v-if="isload !=0"
        class="art-movie-box"
        :style="{background:'url('+movieList[0]+')','background-size':'100% 100%'}"
      ></div>
      <div class="art-movie-msg">
        <p>名称:创造营</p>
        <p>名称:创造营</p>
      </div>
    </nuxt-link>
  </div>
</template>

<script>
export default {
  name: "movieBox",
  props: ["isload"],
  data() {
    return {
      movieList: ["/img/chuangzaoying.webp"],
      noImg: "#",
    };
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
@media screen and (min-width: 1106px) {
  .movie-box-row {
    // padding: 10px;
    margin: 10px;
  }
  .art-movie-box {
    width: 135px;
    height: 159.5px;
  }
}
@media screen and (max-width: 1106px) {
  .movie-box-row {
    padding: 5px;
  }
  .art-movie-box {
    // width: 100%;
    height: 0;
    padding-bottom: 140%;
  }
}
.movie-box-row {
  &:hover {
    box-shadow: 0px 0px 6px #ccc;
  }
}
.art-movie-box {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease-in-out;
  cursor: pointer;
  // animation: fadeIn 0.4s ease-in-out;
  &:hover .art-movie-box-mask {
    transform: translate(0px, -40px);
  }
  .art-movie-box-mask {
    position: absolute;
    width: 100%;
    height: 40px;
    bottom: -40px;
    left: 0px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    transition: all 0.4s ease-in-out;
    p {
      height: 20px;
      font-size: 14px;
      padding-left: 4px;
      padding-right: 4px;
      text-align: left;
      display: flex;
      justify-content: space-between;
      &:nth-of-type(2) {
        justify-content: center;
      }
    }
  }
}
.art-movie-msg {
  padding: 10px;
  background-color: #f5f5f5;
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  p {
    &:nth-of-type(1) {
      color: black;
    }
    &:nth-of-type(2) {
      color: #ccc;
    }
  }
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
</style>